// 添加点击事件
// 获取元素
const register=document.querySelector("#register");
const formBack=document.querySelector(".form-back");
register.addEventListener("click",function(){
    register.style.display="none"
});
formBack.addEventListener("click",function(e){
  e.stopPropagation();
});
// 获取验证码
// 获取元素
const authCode=document.querySelector("#register .form-back p span");
const authCodeTime=document.querySelector("#register .form-back p a");
authCode.addEventListener("click",function(){
    authCode.style.display="none";
    let re=6;
    let timeID= window.setInterval(function(){
        re--;
        authCodeTime.innerText=re;
        if(re<=0){
            window.clearInterval(timeID);
            authCode.style.display="block";
            authCodeTime.innerText=6;
        }
    },1000)
})